<?php
session_start();
require_once('session.php');
require_once("../inc/conn.php");
$sql="select * from qq where id='".$_GET['id']."'";
$result=mysql_query($sql);
$rs=mysql_fetch_array($result);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<link href="css/table.css" rel="stylesheet" type="text/css" />
</head>
<body>
<?php
if($_POST['qqnum']==""){
    echo "<script>alert('QQ号码不能为空！');history.go(-1)</script>";
    exit;
}
$sql_modify="UPDATE qq set title='".$_POST['title']."',qqnum='".$_POST['qqnum']."',truename='".$_POST['truename']."' WHERE id='".$_GET['id']."'";
mysql_query($sql_modify,$conn);
echo "<script>alert('修改成功');window.location.href='qq_list.php';</script>";
mysql_close($conn);
?>
</body>
</html>